AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )

function ENT:Initialize()
	self.BaseClass.Initialize(self)
	self.damaged = 0
	self.WireDebugName = self.PrintName
	self.Outputs = Wire_CreateOutputs(self.Entity, { 
	"Oxygen Isotopes", 
	"Hydrogen Isotopes", 
	--"Helium Isotopes", 
	"Nitrogen Isotopes", 
	--"Liquid Ozone", 
	--"Heavy Water", 
	--"Strontium Clathrates", 
	"Max Oxygen Isotopes", 
	"Max Hydrogen Isotopes", 
	--"Max Helium Isotopes", 
	"Max Nitrogen Isotopes"
	--"Max Liquid Ozone", 
	--"Max Heavy Water", 
	--"Max Strontium Clathrates"
	}) 	

end 

function ENT:OnRemove()
	
end

function ENT:Think()
	self.BaseClass.Think(self)
	
	self:UpdateWireOutput()		
end

function ENT:UpdateWireOutput()
	local ice1 = RD.GetResourceAmount(self, "Oxygen Isotopes") 
	local ice2 = RD.GetResourceAmount(self, "Hydrogen Isotopes") 
	--local ice3 = RD.GetResourceAmount(self, "Helium Isotopes") 
	local ice4 = RD.GetResourceAmount(self, "Nitrogen Isotopes") 
	--local ice5 = RD.GetResourceAmount(self, "Liquid Ozone") 
	--local ice6 = RD.GetResourceAmount(self, "Heavy Water") 
	--local ice7 = RD.GetResourceAmount(self, "Strontium Clathrates") 
	
	local maxice1 = RD.GetNetworkCapacity(self, "Oxygen Isotopes") 
	local maxice2 = RD.GetNetworkCapacity(self, "Hydrogen Isotopes") 
	--local maxice3 = RD.GetNetworkCapacity(self, "Helium Isotopes") 
	local maxice4 = RD.GetNetworkCapacity(self, "Nitrogen Isotopes") 
	--local maxice5 = RD.GetNetworkCapacity(self, "Liquid Ozone") 
	--local maxice6 = RD.GetNetworkCapacity(self, "Heavy Water") 
	--local maxice7 = RD.GetNetworkCapacity(self, "Strontium Clathrates") 
		
	Wire_TriggerOutput(self, "Oxygen Isotopes", ice1)
	Wire_TriggerOutput(self, "Hydrogen Isotopes", ice2)
	--Wire_TriggerOutput(self, "Helium Isotopes", ice3)
	Wire_TriggerOutput(self, "Nitrogen Isotopes", ice4)
	--Wire_TriggerOutput(self, "Liquid Ozone", ice5)
	--Wire_TriggerOutput(self, "Heavy Water", ice6)
	--Wire_TriggerOutput(self, "Strontium Clathrates", ice7)
	
	Wire_TriggerOutput(self, "Max Oxygen Isotopes", maxice1)
	Wire_TriggerOutput(self, "Max Hydrogen Isotopes", maxice2)
	--Wire_TriggerOutput(self, "Max Helium Isotopes", maxice3)
	Wire_TriggerOutput(self, "Max Nitrogen Isotopes", maxice4)
	--Wire_TriggerOutput(self, "Max Liquid Ozone", maxice5)
	--Wire_TriggerOutput(self, "Max Heavy Water", maxice6)
	--Wire_TriggerOutput(self, "Max Strontium Clathrates", maxice7)
end



